package com.training.java.core.collections.car.post15;

import java.util.HashMap;
import java.util.Map;

public class MapDemo {

	/**
	 * Purpose of the priogram is to observe the map collection
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		Map<String, String> directory = new HashMap<String, String>();

		directory.put("Satya", "972 506 7885");
		directory.put("Satish", "469 371 2366");
		directory.put("Vijaya", "972 869 0042");
		directory.put("Rupa", "972 550 0208");
		directory.put("Rupa", "972 550 0208");// duplicate entry

		// Getting the VALUE of KEY Rupa.
		System.out.println("What is Rupa's Phone number:  "
				+ directory.get("Rupa"));

		// rupa is not a valid KEY.
		System.out.println("What is rupa's Phone number:  "
				+ directory.get("rupa"));

	}
}
